<template>
  <div class="hello">
    {{message}}
  </div>
</template>

<script>
export default {
  name: 'HelloWorld',
  props: {
    msg: String
  },
  data() {
    return{
      message: '搭建Vue Cli。'
    }
  },
  created() {
    this.init();
    this.initData();
  },
  methods: {
    init() {
      this.$nextTick(()=> {
        document.querySelector('.hello').style.color = 'green';
      });
    },
    initData() {

    }
  }
}
</script>

<style scoped lang="scss">
body {
  div {
    color: red;
  }
}
</style>
